/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.knezevic.realestate.util;

import com.knezevic.realestate.Advert;
import java.util.Comparator;

/**
 *
 * @author Nemanja
 */
public class AdvertComparatorByDate implements Comparator<Advert>{

    public int compare(Advert o1, Advert o2) {
        return o2.getDate().compareTo(o1.getDate());
    }

}
